import request from "./index";

/**
 * 用户登录
 * @param nickname {string}
 * @param password {string}
 * @returns {Promise}
 */
export function userLogin(nickname, password) {
  return request({
    url: "/auth/login",
    method: "POST",
    data: {
      nickname,
      password
    }
  })
}

/**
 * 修改用户信条
 * @param creed {string}
 * @returns {Promise}
 */
export function updateCreed(creed) {
  return request({
    url: "/users/creed",
    method: "PATCH",
    data: {
      creed
    }
  })
}
